refactor: replace prettier with oxfmt#713
Conversation
- Remove prettier and prettier-plugin-tailwindcss - Add oxfmt@0.36.0 with equivalent config in .oxfmtrc.json - Tailwind CSS class sorting now built-in via sortTailwindcss option - Update scripts, lefthook pre-commit hook, and VS Code extension recommendation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughReplaces Prettier with oxfmt across the repo: adds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 22: The package.json currently defines a "format" npm script but the PR
description references updating the "pretty" script; verify whether you intended
to rename "pretty" to "format" or keep the original name. If the rename is
intentional, update the PR description to mention "format" (and any CI/docs
referencing "pretty") and ensure any tooling/README/CI that calls "pretty" is
updated to call "format"; if it was unintentional, change the script key back to
"pretty" so package.json matches the PR description.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 56b8ed83-f91b-4299-9c81-a57d4977d72d
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
.oxfmtrc.json.prettierignore.prettierrc.cjs.vscode/extensions.jsondocker-compose.ymllefthook.ymlpackage.jsonsrc/components/icons/svgr.config.cjssrc/components/ui/input-group.tsx
💤 Files with no reviewable changes (2)
- .prettierrc.cjs
- .prettierignore
| "storybook": "storybook dev --no-open -p 6006", | ||
| "storybook:build": "storybook build && mv ./storybook-static ./public/storybook", | ||
| "pretty": "prettier -w .", | ||
| "format": "oxfmt", |
There was a problem hiding this comment.
Minor inconsistency with PR description.
The PR description mentions updating the pretty script, but this shows a format script. This may be intentional (renaming the script), but please verify this is the intended script name change.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@package.json` at line 22, The package.json currently defines a "format" npm
script but the PR description references updating the "pretty" script; verify
whether you intended to rename "pretty" to "format" or keep the original name.
If the rename is intentional, update the PR description to mention "format" (and
any CI/docs referencing "pretty") and ensure any tooling/README/CI that calls
"pretty" is updated to call "format"; if it was unintentional, change the script
key back to "pretty" so package.json matches the PR description.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.oxfmtrc.json (1)
20-20: Don't excludepackage.jsonunless that opt-out is intentional.Line 20 prevents Oxfmt from formatting
package.jsonat all, because files matched byignorePatternscannot be formatted even when explicitly targeted. Oxfmt also sortspackage.jsonkeys by default, so this skips one of the built-in behaviors you just switched to. (oxc.rs)Suggested change
- "package.json",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.oxfmtrc.json at line 20, The ignorePatterns entry "package.json" is preventing Oxfmt from formatting and sorting package.json; remove that entry from the ignorePatterns array (or change it only if you truly intend to opt-out) so Oxfmt can process package.json and apply its default key-sorting/formatting behavior; look for the "ignorePatterns" key in .oxfmtrc.json and delete or modify the "package.json" string.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.oxfmtrc.json:
- Line 20: The ignorePatterns entry "package.json" is preventing Oxfmt from
formatting and sorting package.json; remove that entry from the ignorePatterns
array (or change it only if you truly intend to opt-out) so Oxfmt can process
package.json and apply its default key-sorting/formatting behavior; look for the
"ignorePatterns" key in .oxfmtrc.json and delete or modify the "package.json"
string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 74b0057a-86ee-454a-b0ce-734a3c9e3e66
📒 Files selected for processing (2)
.oxfmtrc.jsondocker-compose.yml
gen:icons command is not working anymore because prettier is needed as a module
|
@yoannfleurydev I can not reproduce your issue locally. |
Replace `prettier: false` with an explicit `plugins` list so that `@svgr/plugin-prettier` is never loaded, fixing the `Cannot find module 'prettier'` error when running gen:icons. Also scope the oxfmt generated ignorePattern to only the db generated folder instead of all generated directories. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bac7054 to
99dc941
Compare
|
I've setup a new worktree, it is working as expected. |




Summary
prettierandprettier-plugin-tailwindcsswithoxfmt@0.36.0.oxfmtrc.jsonwith equivalent formatting config (singleQuote, semi, tabWidth, trailingComma, arrowParens)sortTailwindcss(no separate plugin needed)prettyandgen:iconsscripts to useoxfmtoxfmt, addcss/scssto globesbenp.prettier-vscodewithoxc.oxc-vscodein VS Code recommendationsTest plan
pnpm prettyand verify formatting workspnpm gen:iconsand verify icons are generated and formattedSummary by CodeRabbit